<template>
  <div class="hoemrec">
    <div><h3>热门推荐</h3></div>
    <div class="recommends">
      <div class="rec-item" :key="index" v-for="(item, index) in recommends">
        <a :href="item.link">
          <img :src="item.image" alt="" />
          <p>{{ item.title }}</p>
        </a>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "HomeRecommend",
  props: {
    recommends: {
      type: Array,
      default() {
        return [];
      },
    },
  },
};
</script>

<style scoped>
.hoemrec h3 {
  text-align: center;
  font-size: 19px;
  font-weight: 500;
  color: black;
  padding-top: 10px;
}
.recommends {
  width: 100%;
  display: flex;
  text-align: center;
  font-size: 12px;
  padding: 15px 0 18px;
  border-bottom: 12px solid #eee;
}
.rec-item {
  flex: 1;
}

.rec-item img {
  width: 75%;
  margin-bottom: 5px;
}
</style>
